package org.spring.springboot.service.impl;

import java.util.List;

import org.spring.springboot.dao.CategoryDao;
import org.spring.springboot.domain.Category;
import org.spring.springboot.domain.Entity;
import org.spring.springboot.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CategoryServiceImpl implements CategoryService {
	@Autowired
	private CategoryDao cateDao;

	@Override
	public Entity findByCid(int cid) {
		// TODO Auto-generated method stub

		return cateDao.findByCid(cid);
	}

	// @Override
	// public String saveCateEntity(Category cate) {
	// // TODO Auto-generated method stub
	// cateDao.saveCategoryEntity(cate);
	// return "save success!";
	// }

	@Override
	public List<Entity> findAllCategory() {
		// TODO Auto-generated method stub
		return cateDao.findAllCategory();
	}

	@Override
	public Entity findByName(String name) {
		// TODO Auto-generated method stub
		return cateDao.findByName(name);
	}

	@Override
	public Category findByOneAttrId(int id) {
		// TODO Auto-generated method stub
		return cateDao.findByOneAttrId(id);
	}

}
